package com.zhang.sequencegenerate.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * @Description 序列规则配置
 * @Author Mr.Zhang
 * @Date 2025/5/24 23:42
 * @Version 1.0
 */
@Data
@TableName("sequence_rule")
public class SequenceRule implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 模块ID
     */
    @TableField(value = "module_id")
    private String moduleId;

    /**
     * 序列规则
     */
    @TableField(value = "rule")
    private String rule;

    /**
     * 当前流水号
     */
    @TableField(value = "cuid")
    private Integer cuid;

    /**
     * 规则前缀
     */
    @TableField(value = "pref")
    private String pref;
}
